import request from '@/utils/request'
// 获取自助申报列表
export const getAllWaterDeclare = (data) => request.Post(`waterDeclare/getAllWaterDeclare`, data)
// 新增自主申报
export const insertWaterDeclare = (data) => request.Post(`waterDeclare/insertWaterDeclare`, data)
// 查看自主申报
export const catWaterDeclareById = (data) => request.Post(`waterDeclare/catWaterDeclareById`, data)
// 修改自主申报
export const updateWater = (data) => request.Post(`waterDeclare/updateWater`, data)
// 删除申报或者是实际用水(通用)
export const deleteWaterDeclareById = (data) => request.Post(`waterDeclare/deleteWaterDeclareById`, data)

// 获取企业实际用水列表
export const declareBySupervise = (data) => request.Post(`waterDeclare/declareBySupervise`,data)
// 添加企业实际用水
export const insertWaterSupervise = (data) => request.Post(`waterDeclare/insertWaterSupervise`,data)
// 查看企业用水
export const catWaterDeclareSuperviseById = (data) => request.Post(`waterDeclare/catWaterDeclareSuperviseById`,data)
// 修改实际用水
export const updateWaterSupervise = (data) => request.Post(`waterDeclare/updateWaterSupervise`,data)
// 查看用水列表
export const catWanterById = (data) => request.Post(`waterDeclare/catWanterById`, data)
// 季度用水量选择
export const catWaterByYearAndQuarter = (data) => request.Post(`waterDeclare/catWaterByYearAndQuarter`,data)
// 新增季度用水量
export const insertOrUpdateQuarter = (data) => request.Post(`waterDeclare/insertOrUpdateQuarter`,data)
// 获取权限情况
export const getRoleEnabled = (data) => request.Post(`role/getRoleEnabled`,data)
// 禁用或者开启权限
export const updateRoleEnabled = (data) => request.Post(`role/updateRoleEnabled`, data)

// 修改菜单权限
export const updateMenusByRoleId = (data) => request.Post(`menuRole/updateMenusByRoleId`,data)

// 根据rid获取菜单权限
export const getRoleMenuRoleId = (data) => request.Post(`menu/getRoleMenuRoleId`, data)

// 添加用户
export const addUserInfoRequest = (data) => request.Post(`user/addUserInfoRequest`, data)
// 获取所有用户
export const getAllUser = (data) => request.Post(`user/getAllUser`, data)
// 获取用户详情
export const getUserById = (data) => request.Post(`user/getUserById`, data)
// 修改用户状态
export const updateEnabled = (data) => request.Post(`user/updateEnabled`, data)
// 修改用户信息
export const updateUserInfoRequest = (data) => request.Post(`user/updateUserInfoRequest`, data)
// 获取员工信息列表
export const getEmployeeList = (data) => request.Post(`user/getEmployeeList`, data)

// 新增公司
export const addCompanyInfo = (data) => request.Post(`company/addCompanyInfo`, data)
// 修改公司
export const updateCompanyInfo = (data) => request.Post(`company/updateCompanyInfo`, data)
// 获取公司详情
export const getCompanyById = (data) => request.Post(`company/getCompanyById`, data)
// 根据userId获取公司信息
export const getCompanyInfoByUserId = (data) => request.Post(`company/getCompanyInfoByUserId`, data)
// 获取所有公司
export const getAllCompany = (data) => request.Post(`company/getAllCompany`, data)
// 删除公司
export const deleteCompanyInfo = (data) => request.Post(`company/deleteCompanyInfo`, data)

// 获取预警集合
export const getListWarning = (data) => request.Post(`waterWarning/getListWarning`, data)
// 根据id获取详情
export const getWarningById = (data) => request.Post(`waterWarning/getWarningById`, data)
// 根据id修改
export const updateWarningById = (data) => request.Post(`waterWarning/updateWarningById`, data)

// 获取预警列表
export const waterWarningRecordList = (data) => request.Post(`waterWarningRecord/waterWarningRecordList`, data)
// 获取预警详情
export const waterWarningRecordById = (data) => request.Post(`waterWarningRecord/waterWarningRecordById`, data)

// 企业实际用水导入
export const importWaterDeclare = (data) => request.Post(`excel/importWaterDeclare`, data)
// 企业实际用水模板 下载 filePost
export const downloadWaterDeclare = (data) => request.filePost(`excel/downloadWaterDeclare`, data)


// 获取自主申报报表
export const getReportWater = (data) => request.Post(`report/getReportWater`, data)
// 获取企业实际用水报表
export const getReportWaterBySupervise = (data) => request.Post(`report/getReportWaterBySupervise`, data)

// 获取首页企业数
export const getCompanyTotal = () => request.Post(`home/getCompanyTotal`)
// 获取本季度本年预警
export const getWarningYear = () => request.Post(`home/getWarningYear`)
// 单位用水细分分析
export const getWarningSupervise = (data) => request.Post(`home/getWarningSupervise`, data)
// 企业实际用水总量(吨)
export const getWarningSuperviseByActual = () => request.Post(`home/getWarningSuperviseByActual`)
// 超预警细分分析
export const warningCompany = () => request.Post(`home/warningCompany`)
// 用水统计
export const waterStatistics = () => request.Post(`home/waterStatistics`)
// 自主申报导出
export const downloadWaterDeclareAll = (data) => request.filePost(`excel/downloadWaterDeclareAll`, data)
// 企业实际用水导出
export const downloadReallyWaterAll = (data) => request.filePost(`excel/downloadReallyWaterAll`, data)
